<?php

namespace Common\Decorator;

use Common\Interfaces\IDecorator;

class ColorDecorator implements IDecorator
{
    private $color;

    public function __construct($color = 'red')
    {
        $this->color = $color;
    }

    public function beforeDecoratorIndex()
    {
        echo '<div style="color:' . $this->color . '">';
    }
    public function afterDecoratorIndex()
    {
        echo '</div>';
    }
}
